package com.kfm.base.oop4;

public class Graphics {

    public void draw() {
        System.out.println("画图");
    }

    public static void staticMethod(){
        System.out.println("Graphics::staticMethod()");
    }

    public Graphics get(){
        return new Graphics();
    }

}

class Triangle extends Graphics {

    @Override
    public void draw(){
        System.out.println("画三角形");
    }

    public void setLine(){
        System.out.println("设置三条边长");
    }

    public static void staticMethod(){
        System.out.println("Triangle::staticMethod()");
    }

    @Override
    public Triangle get(){
        return new Triangle();
    }
}


class Circle extends Graphics {

    @Override
    public void draw(){
        System.out.println("画圆");
    }


}
